/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BESA.SystemLevel.transactions.gca;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

import BESA.util.ConfigTransactionalBESA;

/**
 * 
 * @author Andreas
 */
public class GCAUtilities {

    public static ClientGCA getClientFacade() {
        try {
            return (ClientGCA) Naming.lookup(ConfigTransactionalBESA.getGCA_URL());
        } catch (MalformedURLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (RemoteException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (NotBoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return null;
    }

    public static GCCGCA getGCCFacade() {
        try {
            return (GCCGCA) Naming.lookup(ConfigTransactionalBESA.getGCA_URL());
        } catch (MalformedURLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (RemoteException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (NotBoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return null;
    }
}
